<?php


class EquipoTable extends Doctrine_Table
{
    
    public static function getInstance()
    {
        return Doctrine_Core::getTable('Equipo');
    }

	public function search($name, $sector = '', $letra = '', $limit = 10) {
	#nombre LIKE ? AND "%". $name."%"
		return $this->createQuery()
		->where("sector = ? AND letra = ? AND Club.nombre LIKE ?",array($sector, $letra, "%".$name."%"))
		->limit($limit)
		->execute()
		->getData();
	}
}